<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var week = prompt('输入今天的日期');
        var  week = Number(week)
        var date = week + 2;
        if( date % 7 === 1 ){
            alert('今天星期一')
        }else if ( date % 7 === 2){
            alert('今天星期二')
        }else if ( date % 7 === 3){
            alert('今天星期三')
        }else if ( date % 7 === 4){
            alert('今天星期四')
        }else if ( date % 7 === 5){
            alert('今天星期五')
        }else if ( date % 7 === 6){
            alert('今天星期六')
        }else if(date % 7 === 7){
            alert('今天星期天')
        }else{
            alert('请输入 1 ~ 31 的数值')
        }
    </script>
</body>
</html>